var fs = require('fs');

function exes(arr, i, fn) {

	var ar = arr[i];
	console.log(ar);
	fs.readFile('a.txt', function(err, data) {
		if (i < arr.length - 1) {
			exes(arr, i + 1, fn);
		}else{
			fn('end......')
		}
	});


}

function main(argument) {
	var a = [1, 2, 3, 4, 5];
	exes(a, 0, function(data) {
		console.log(data)
	});
}
main();